package cn.edu.jnu.supershopper;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.Nullable;

public class GameOverActivity extends Activity {
    TextView tv_score;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gameover);
        tv_score = findViewById(R.id.tv_score);
        Intent intent = getIntent();
        String score = intent.getStringExtra("score");
        tv_score.setText("得分:"+score);
    }

    public void onclick(View view) {
        switch (view.getId()){
            case R.id.bt_playagain:
                Intent intent = new Intent(this, GameFragment.class);
                startActivity(intent);
                return;
            case R.id.bt_back:
                Intent intent1 = new Intent(this, BookListMainActivity.class);
                startActivity(intent1);
                return;
        }
    }
}
